Frames No Frames Cognitoware API v2009512
Cognitoware.Robotics.dll
Cognitoware.Mathematics.Probability

Class MixedDistribution<T>
T: The type of the values predicted by the distribution.

System.Object
Cognitoware.Mathematics.Probability.RandomDistribution<T>
Cognitoware.Mathematics.Probability.MixedDistribution<T>


Summary

A RandomDistribution whose probability values are calculated from the weighted average of other distributions.

Constructor Summary

MixedDistribution()

Method Summary

Add(RandomDistribution<T>, Double)
Adds a new distribution and weight to the mixed distribution.
AliasAs()
Inherited from Cognitoware.Mathematics.Probability.RandomDistribution
Equals(Object)
Inherited from System.Object
Finalize()
Inherited from System.Object
GetEntropy(IEnumerable<T>)
Inherited from Cognitoware.Mathematics.Probability.RandomDistribution
GetHashCode()
Inherited from System.Object
GetType()
Inherited from System.Object
MemberwiseClone()
Inherited from System.Object
Normalize()
Normalizes the weights of the mixed distribution.
ProbabilityOf(T)
Returns the probability of a specific value of T.
Sample(Random)
Not implemented in MixedDistribuion.
ToString()
Inherited from System.Object

Details

A RandomDistribution whose probability values are calculated from the weighted average of other distributions. The user is responsible for ensuring that the weights are normalized.

Constructor Details

public MixedDistribution()

Method Details

public void Add(RandomDistribution<T> p, Double weight)
Adds a new distribution and weight to the mixed distribution.

Parameters:

p - The distribution to mix.
weight - The weight of the distribution.

public void Normalize()
Traverses all of the distributions to sum the weights, then traverses them all again to divide all of the weights by the total weight sum.

public override Double ProbabilityOf(T t)
Returns the probability of a specific value of T. The probability of t is retrieved for each contained distribution and multiplied by the associated weight. The sum of these products is returned.

Parameters:

t - The value whose probability is returned.

Returns:

The probability of t.

public override T Sample(Random select)
This implementation throws NotImplementedException.


Questions, Comments and Licensing
Copyright 2009 Cognitoware. All rights reserved.